-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent broken Tickets pages when tickets have been sold #973
Conversation
…r slug when tickets have been sold
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍🏻
} | ||
|
||
// Cannot change the slug anymore. | ||
if ( $postarr['post_name'] !== $post_before->post_name ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think after you refactored in 17b1e53 $post_before
is no longer in scope.
I had to revert this PR. See: |
Removing the shortcode from the tickets page, or changing its slug or publicity breaks the ability to refund tickets, etc.
This PR aims to prevent removal of camptix shortcode, change in page publicity or slug when tickets have been sold.
Fixes #402
Props @iandunn
TODO
Screenshots
Warning when changes are prevented, block editor.
Warning when changes are prevented, classic editor.
Error when changes are tried, block editor.
Error when changes are tried, classic editor.
How to test the changes in this Pull Request: